package com.ruoyi.cms.article.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.cms.article.domain.CmsArticle;
import com.ruoyi.cms.article.domain.CmsArticleType;
import com.ruoyi.cms.article.mapper.CmsArticleMapper;
import com.ruoyi.cms.article.mapper.CmsArticleTypeMapper;
import com.ruoyi.cms.article.service.ICmsArticleService;
import com.ruoyi.cms.article.service.ICmsArticleTypeService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;
import java.util.List;

public class CmsArticleTypeService extends ServiceImpl<CmsArticleTypeMapper, CmsArticleType> implements ICmsArticleTypeService {


    @Resource
    private CmsArticleTypeMapper cmsArticleTypeMapper;

    @Override
    public int batchArticleType(List<CmsArticleType> articleTypeList) {
        return cmsArticleTypeMapper.batchArticleType(articleTypeList);
    }

    @Override
    public int deleteArticleTypeByArticleId(Long articleId) {
        return cmsArticleTypeMapper.deleteArticleTypeByArticleId(articleId);
    }

    @Override
    public int deleteArticleType(Long[] ids) {
        return cmsArticleTypeMapper.deleteArticleType(ids);
    }


    @Override
    public List<CmsArticleType> selectArticleTypeList(Long articleId) {
        return cmsArticleTypeMapper.selectArticleTypeList(articleId);
    }
}
